﻿@model borkoSi.Models.Albums

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "borkoSi - Slike";
}

@section bodytitle{
    <h1>Slike</h1>
    <h2><a href="@ViewBag.FlickrPhotostreamURL" title="Vse slike so tudi na Flickerju" target="_blank">Vse slike tudi na Flickerju</a></h2> 
}

@*<div class="body-left-other">
    <ul>
        @foreach(var i in Model.Albums)
        {
            <li>@Html.ActionLink(@i.Name, "Album", "Gallery", new { id = @i.GalleryId }, null)</li>
        }
    </ul>
</div>*@

<div class="body-left-other">
    <span>Leto 2013</span>
    <br /><br />
    <div id="dropdownPoint">     <!-- pointPoint NE DELA!!! -->
        @Html.DropDownList("AlbumsDropdown", (IEnumerable<SelectListItem>)@Model.AlbumsDropdownItems, new { style =  "width: 220px;"})
    </div>
</div>

<div class="body-right-other">
    <div style="margin-left: 50px; padding-left: 80px; border-left: 1px solid black">
        <div id="galeryFlickr" style="width: 570px; height: 380px; background: #000; margin: auto;"/>
    </div>
</div>

@section Scripts
{

    <script type="text/javascript" src="@Url.Content("/Scripts/myFunctions.js")"></script>
   
    <!-- jQuery -->
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <!-- Galleria -->
    <script src="../../Addons/galleria/galleria-1.2.9.min.js" type="text/javascript"></script>
    <script src="../../Addons/galleria/plugins/flickr/galleria.flickr.min.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function () {

            // pointPoint points to 'dropdownPoint'
            //pointPoint('dropdownPoint');

            // galery
            Galleria.loadTheme('../../Addons/galleria/themes/classic/galleria.classic.min.js');
            Galleria.configure({
                autoplay: 5000,
                imageCrop: false,
                transition: "flash",
                transitionSpeed: 1000,
                showCounter: false,
                showInfo: false,
            });

            // Disable right click & drag copy in Galleria
            $('#galeryFlickr').bind('contextmenu', function(e){
                return false;
            });

            $('#galeryFlickr').bind('dragstart', function(e){
                return false;
            });

            // at begining galleria set is set to dropdown's "at start" selected value
            prepareGalleria('AlbumsDropdown', 'galeryFlickr');

            $('#AlbumsDropdown').change(function () {

                // prepares galleria with right set number
                prepareGalleria('AlbumsDropdown', 'galeryFlickr');

            });

        });

    </script>
}

